home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 6.8 KB | 405 lines | [TEXT/MPS ] |
- ;
- ; File: Menus.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
- __MENUS__ SET 1
-
-
- IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
- include 'Memory.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'ConditionalMacros.a' ;
- ; include 'MixedMode.a' ;
-
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
- ; include 'QuickdrawText.a' ;
-
- IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
- include 'Events.a'
- ENDIF
- ; include 'OSUtils.a' ;
-
- noMark EQU 0 ;mark symbol for MarkItem
- ; menu defProc messages
- mDrawMsg EQU 0
- mChooseMsg EQU 1
- mSizeMsg EQU 2
- mDrawItemMsg EQU 4
- mCalcItemMsg EQU 5
- textMenuProc EQU 0
- hMenuCmd EQU 27 ;itemCmd == 0x001B ==> hierarchical menu
- hierMenu EQU -1 ;a hierarchical menu - for InsertMenu call
- mPopUpMsg EQU 3 ;menu defProc messages - place yourself
- mctAllItems EQU -98 ;search for all Items for the given ID
- mctLastIDIndic EQU -99 ;last color table entry has this in ID field
-
- IF &TYPE('STRICT_MENUS') = 'UNDEFINED' THEN
- STRICT_MENUS: SET 0
- ENDIF
- IF STRICT_MENUS THEN
- ELSE
- MenuInfo RECORD 0
- menuID ds.w 1
- menuWidth ds.w 1
- menuHeight ds.w 1
- menuProc ds.l 1
- enableFlags ds.l 1
- menuData ds.l 64
- sizeof EQU 270
- ENDR
-
- ENDIF
- MCEntry RECORD 0
- mctID ds.w 1 ;menu ID. ID = 0 is the menu bar
- mctItem ds.w 1 ;menu Item. Item = 0 is a title
- mctRGB1 ds RGBColor ;usage depends on ID and Item
- mctRGB2 ds RGBColor ;usage depends on ID and Item
- mctRGB3 ds RGBColor ;usage depends on ID and Item
- mctRGB4 ds RGBColor ;usage depends on ID and Item
- mctReserved ds.w 1 ;reserved for internal use
- sizeof EQU 30
- ENDR
-
- MenuCRsrc RECORD 0
- numEntries ds.w 1 ;number of entries
- mcEntryRecs ds.w 15 ;ARRAY [1..numEntries] of MCEntry
- sizeof EQU 32
- ENDR
-
- IF GENERATING68K THEN
- Macro
- GetMBarHeight
- move.W $0BAA,(sp)
- EndM
- ELSE
- IMPORT GetMBarHeight
- ENDIF
-
- IF GENERATING68K THEN
- _InitMenus: OPWORD $A930
- ELSE
- IMPORT InitMenus
- ENDIF
-
- IF GENERATING68K THEN
- _NewMenu: OPWORD $A931
- ELSE
- IMPORT NewMenu
- ENDIF
-
- IF GENERATING68K THEN
- _GetMenu: OPWORD $A9BF
- ELSE
- IMPORT GetMenu
- ENDIF
-
- IF GENERATING68K THEN
- _DisposeMenu: OPWORD $A932
- ELSE
- IMPORT DisposeMenu
- ENDIF
-
- IF GENERATING68K THEN
- _AppendMenu: OPWORD $A933
- ELSE
- IMPORT AppendMenu
- ENDIF
-
- IF GENERATING68K THEN
- _AppendResMenu: OPWORD $A94D
- ELSE
- IMPORT AppendResMenu
- ENDIF
-
- IF GENERATING68K THEN
- _InsertResMenu: OPWORD $A951
- ELSE
- IMPORT InsertResMenu
- ENDIF
-
- IF GENERATING68K THEN
- _InsertMenu: OPWORD $A935
- ELSE
- IMPORT InsertMenu
- ENDIF
-
- IF GENERATING68K THEN
- _DrawMenuBar: OPWORD $A937
- ELSE
- IMPORT DrawMenuBar
- ENDIF
-
- IF GENERATING68K THEN
- _InvalMenuBar: OPWORD $A81D
- ELSE
- IMPORT InvalMenuBar
- ENDIF
-
- IF GENERATING68K THEN
- _DeleteMenu: OPWORD $A936
- ELSE
- IMPORT DeleteMenu
- ENDIF
-
- IF GENERATING68K THEN
- _ClearMenuBar: OPWORD $A934
- ELSE
- IMPORT ClearMenuBar
- ENDIF
-
- IF GENERATING68K THEN
- _GetNewMBar: OPWORD $A9C0
- ELSE
- IMPORT GetNewMBar
- ENDIF
-
- IF GENERATING68K THEN
- _GetMenuBar: OPWORD $A93B
- ELSE
- IMPORT GetMenuBar
- ENDIF
-
- IF GENERATING68K THEN
- _SetMenuBar: OPWORD $A93C
- ELSE
- IMPORT SetMenuBar
- ENDIF
-
- IF GENERATING68K THEN
- _InsertMenuItem: OPWORD $A826
- ELSE
- IMPORT InsertMenuItem
- ENDIF
-
- IF GENERATING68K THEN
- _DeleteMenuItem: OPWORD $A952
- ELSE
- IMPORT DeleteMenuItem
- ENDIF
-
- IF GENERATING68K THEN
- _MenuKey: OPWORD $A93E
- ELSE
- IMPORT MenuKey
- ENDIF
-
- IF GENERATING68K THEN
- _HiliteMenu: OPWORD $A938
- ELSE
- IMPORT HiliteMenu
- ENDIF
-
- IF GENERATING68K THEN
- _SetMenuItemText: OPWORD $A947
- ELSE
- IMPORT SetMenuItemText
- ENDIF
-
- IF GENERATING68K THEN
- _GetMenuItemText: OPWORD $A946
- ELSE
- IMPORT GetMenuItemText
- ENDIF
-
- IF GENERATING68K THEN
- _DisableItem: OPWORD $A93A
- ELSE
- IMPORT DisableItem
- ENDIF
-
- IF GENERATING68K THEN
- _EnableItem: OPWORD $A939
- ELSE
- IMPORT EnableItem
- ENDIF
-
- IF GENERATING68K THEN
- _CheckItem: OPWORD $A945
- ELSE
- IMPORT CheckItem
- ENDIF
-
- IF GENERATING68K THEN
- _SetItemMark: OPWORD $A944
- ELSE
- IMPORT SetItemMark
- ENDIF
-
- IF GENERATING68K THEN
- _GetItemMark: OPWORD $A943
- ELSE
- IMPORT GetItemMark
- ENDIF
-
- IF GENERATING68K THEN
- _SetItemIcon: OPWORD $A940
- ELSE
- IMPORT SetItemIcon
- ENDIF
-
- IF GENERATING68K THEN
- _GetItemIcon: OPWORD $A93F
- ELSE
- IMPORT GetItemIcon
- ENDIF
-
- IF GENERATING68K THEN
- _SetItemStyle: OPWORD $A942
- ELSE
- IMPORT SetItemStyle
- ENDIF
-
- IF GENERATING68K THEN
- _CalcMenuSize: OPWORD $A948
- ELSE
- IMPORT CalcMenuSize
- ENDIF
-
- IF GENERATING68K THEN
- _CountMItems: OPWORD $A950
- ELSE
- IMPORT CountMItems
- ENDIF
-
- IF GENERATING68K THEN
- _GetMenuHandle: OPWORD $A949
- ELSE
- IMPORT GetMenuHandle
- ENDIF
-
- IF GENERATING68K THEN
- _FlashMenuBar: OPWORD $A94C
- ELSE
- IMPORT FlashMenuBar
- ENDIF
-
- IF GENERATING68K THEN
- _SetMenuFlash: OPWORD $A94A
- ELSE
- IMPORT SetMenuFlash
- ENDIF
-
- IF GENERATING68K THEN
- _MenuSelect: OPWORD $A93D
- ELSE
- IMPORT MenuSelect
- ENDIF
-
- IF GENERATING68K THEN
- _InitProcMenu: OPWORD $A808
- ELSE
- IMPORT InitProcMenu
- ENDIF
-
- IF GENERATING68K THEN
- _GetItemCmd: OPWORD $A84E
- ELSE
- IMPORT GetItemCmd
- ENDIF
-
- IF GENERATING68K THEN
- _SetItemCmd: OPWORD $A84F
- ELSE
- IMPORT SetItemCmd
- ENDIF
-
- IF GENERATING68K THEN
- _PopUpMenuSelect: OPWORD $A80B
- ELSE
- IMPORT PopUpMenuSelect
- ENDIF
-
- IF GENERATING68K THEN
- _MenuChoice: OPWORD $AA66
- ELSE
- IMPORT MenuChoice
- ENDIF
-
- IF GENERATING68K THEN
- _DeleteMCEntries: OPWORD $AA60
- ELSE
- IMPORT DeleteMCEntries
- ENDIF
-
- IF GENERATING68K THEN
- _GetMCInfo: OPWORD $AA61
- ELSE
- IMPORT GetMCInfo
- ENDIF
-
- IF GENERATING68K THEN
- _SetMCInfo: OPWORD $AA62
- ELSE
- IMPORT SetMCInfo
- ENDIF
-
- IF GENERATING68K THEN
- _DisposeMCInfo: OPWORD $AA63
- ELSE
- IMPORT DisposeMCInfo
- ENDIF
-
- IF GENERATING68K THEN
- _GetMCEntry: OPWORD $AA64
- ELSE
- IMPORT GetMCEntry
- ENDIF
-
- IF GENERATING68K THEN
- _SetMCEntries: OPWORD $AA65
- ELSE
- IMPORT SetMCEntries
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _InsertFontResMenu
- move.w #$0400,d0
- dc.w $A825
- EndM
- ELSE
- IMPORT InsertFontResMenu
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _InsertIntlResMenu
- move.w #$0601,d0
- dc.w $A825
- EndM
- ELSE
- IMPORT InsertIntlResMenu
- ENDIF
-
- IF GENERATING68K THEN
- _SystemEdit: OPWORD $A9C2
- ELSE
- IMPORT SystemEdit
- ENDIF
-
- IF GENERATING68K THEN
- _SystemMenu: OPWORD $A9B5
- ELSE
- IMPORT SystemMenu
- ENDIF
-
- IF OLDROUTINENAMES THEN
- ENDIF
- ENDIF ; __MENUS__
-